Commentary for Avodah Zarah 92:4
א"ל רב הונא בריה דרב יהושע לרבא או חילוף ומה נעבד שאסור בתלוש אצל הדיוט מותר במחובר לגבוה שנא' (דברים יב, ב) אלהיהם על ההרים ולא ההרים אלהיהם לא שנא להדיוט ולא שנא לגבוה אתנן שמותר בתלוש להדיוט אינו דין שמותר במחובר לגבוה
R. Huna the son of R. Joshua said to Rava: Or perhaps the opposite [may be concluded]: If a worshipped object which may not be used for secular purposes when it is detached but is permitted in divine worship when attached, as it is said, “‘Their gods upon the high mountains,’ not the mountains which are their gods,” and it does not make a difference whether it is for secular use or for the divine worship, how much more must the hire of a harlot which is usable for secular purposes when it is detached be permissible in the divine worship when it is attached!